    function shows1(a) {
        $('#attend4').val(a);
    }

    function shows2(a) {
        $('#attend6').val(a);
    }

    function shows3(a) {
        $('#attend8').val(a);
    }

    function shows4(a) {
        $('#attend9').val(a);
    }

    function shows5(a) {
        $('#dropdown_name5').val(a);
    }
    $(document).ready(function() {
        $("#goto_step2").click(function(event) {
            $("#step1").hide();
            $("#step2").show();
        });
        $("#goto_step3").click(function(event) {
            $("#step2").hide();
            $("#step3").show();
        });
        $("#goto_step4").click(function(event) {
            $("#step3").hide();
            $("#step4").show();
        });
        $("#goto_step5").click(function(event) {
            $("#step4").hide();
            $("#step5").show();
        });
        $("#goto_step6").click(function(event) {
            $("#step5").hide();
            $("#step6").show();
        });
        $("#back_step1").click(function(event) {
            $("#step2").hide();
            $("#step1").show();
        });
        $("#back_step2").click(function(event) {
            $("#step3").hide();
            $("#step2").show();
        });
        $("#back_step3").click(function(event) {
            $("#step4").hide();
            $("#step3").show();
        });
        $("#back_step4").click(function(event) {
            $("#step5").hide();
            $("#step4").show();
        });
        $("#back_step5").click(function(event) {
            $("#step6").hide();
            $("#step5").show();
        });
        var recordcount = 1;
        $("#step6").on('click', '#add_record', function(event) {
            recordcount++;
            $("#content").append("<div><div class='div_border row'><div class='col-xs-2 tag_name ''>时间</div><div class='col-xs-9 tag_val'><input type='text' disabled='value' class='form-control time_HMS add write'></div></div><div class='div_border' style='height: auto!important;'><div class='div_border row'><div class='col-xs-3 tag_name  ' >教学活动</div><div class='col-xs-9 tag_val '><input type='text' placeholder='请输入教学活动' class='form-control add write' id='recordid2'></div></div><div class='div_border row'><div class='col-xs-3 tag_name  ' >随堂评注</div><div class='col-xs-9 tag_val '><input type='text' placeholder='请输入教学活动' class='form-control add write' id='recordid3'></div></div></div>");
            var recordid = 4;
            $("#step6_form .add").each(function() {
                $(this).last().attr("id", "attend_record" + recordid);
                recordid = recordid + 1;
            });
            var mydate = new Date();
            var t = mydate.toLocaleString();
            var hour = mydate.getHours();
            var minutes = mydate.getMinutes();
            var second = mydate.getSeconds();
            $(".time_HMS:last").val(hour + ":" + minutes + ":" + second);
        });
        var mydate = new Date();
        var t = mydate.toLocaleString();
        var hour = mydate.getHours();
        var minutes = mydate.getMinutes();
        var second = mydate.getSeconds();
        $(".time_HMS").val(hour + ":" + minutes + ":" + second);
        var $tgaUpload = $('#Upload').diyUpload({
            url: 'upload/image',
            success: function(data) {},
            error: function(err) {},
            buttonText: '',
            accept: {
                title: "Images",
                extensions: 'gif,jpg,jpeg,bmp,png'
            },
            thumb: {
                width: 120,
                height: 90,
                quality: 100,
                allowMagnify: true,
                crop: true,
                type: "image/jpeg"
            }
        });
        $("#submit").click(function(event) {
            var attend1 = $("#attend1").val();
            var attend2 = $("#attend2").val();
            var attend3 = $("#attend3").val();
            var attend4 = $("#attend4").val();
            var attend5 = $("#attend5").val();
            var attend6 = $("#attend6").val();
            var attend7 = $("#attend7").val();
            var attend8 = $("#attend8").val();
            var attend9 = $("#attend9").val();
            var attend10 = $("#attend10").val();
            var attend11 = $("#attend11").val();
            var attend12 = $("#attend12").val();
            var attend = new Array(attend1, attend2, attend3, attend4, attend5, attend6, attend7, attend8, attend9, attend10, attend11, attend12);
            var teachingLevel1 = $("#teachingLevel1").val();
            var teachingLevel2 = $("#teachingLevel2").val();
            var teachingLevel3 = $("#teachingLevel3").val();
            var teachingLevel4 = $("#teachingLevel4").val();
            var teachingLevel5 = $("#teachingLevel5").val();
            var teachingLevel6 = $("#teachingLevel6").val();
            var teachingLevel7 = $("#teachingLevel7").val();
            var teachingLevel8 = $("#teachingLevel8").val();
            var teachingLevel9 = $("#teachingLevel9").val();
            var teachingLevel = new Array(teachingLevel1, teachingLevel2, teachingLevel3, teachingLevel4, teachingLevel5, teachingLevel6, teachingLevel7, teachingLevel8, teachingLevel9);
            var teachingEffect1 = $("#teachingEffect1").val();
            var teachingEffect2 = $("#teachingEffect2").val();
            var teachingEffect3 = $("#teachingEffect3").val();
            var teachingEffect4 = $("#teachingEffect4").val();
            var teachingEffect5 = $("#teachingEffect5").val();
            var teachingEffect6 = $("#teachingEffect6").val();
            var teachingEffect = new Array(teachingEffect1, teachingEffect2, teachingEffect3, teachingEffect4, teachingEffect5, teachingEffect6);
            var teachingReadiness1 = $('input:radio[name="item1"]:checked').val();
            var teachingReadiness2 = $('input:radio[name="item2"]:checked').val();
            var teachingReadiness3 = $('input:radio[name="item3"]:checked').val();
            var teachingReadiness4 = $('input:radio[name="item4"]:checked').val();
            var teachingReadiness5 = $('input:radio[name="item5"]:checked').val();
            var teachingReadiness6 = $('input:radio[name="item6"]:checked').val();
            var teachingReadiness7 = $('input:radio[name="item7"]:checked').val();
            var teachingReadiness8 = $('input:radio[name="item8"]:checked').val();
            var teachingReadiness9 = $('input:radio[name="item9"]:checked').val();
            var teachingReadiness10 = $('input:radio[name="item10"]:checked').val();
            var teachingReadiness11 = $('input:radio[name="item11"]:checked').val();
            var teachingReadiness12 = $('input:radio[name="item12"]:checked').val();
            var teachingReadiness = new Array(teachingReadiness1, teachingReadiness2, teachingReadiness3, teachingReadiness4, teachingReadiness5, teachingReadiness6, teachingReadiness7, teachingReadiness8, teachingReadiness9, teachingReadiness10, teachingReadiness11, teachingReadiness12);
            var studentsNorm1 = $("#studentsNorm1").val();
            var studentsNorm2 = $("#studentsNorm2").val();
            var studentsNorm3 = $("#studentsNorm3").val();
            var studentsNorm4 = $("#studentsNorm4").val();
            var studentsNorm5 = $("#studentsNorm5").val();
            var studentsNorm6 = $("#studentsNorm6").val();
            var studentsNorm7 = $("#studentsNorm7").val();
            var studentsNorm8 = $("#studentsNorm8").val();
            var studentsNorm9 = $("#studentsNorm9").val();
            var studentsNorm = new Array(studentsNorm1, studentsNorm2, studentsNorm3, studentsNorm4, studentsNorm5, studentsNorm6, studentsNorm7, studentsNorm8, studentsNorm9);
            var classroom_facilities = $('input:radio[name="item13"]:checked').val();
            var classroom_environmental = $('input:radio[name="item14"]:checked').val();
            var attend_record = new Array();
            $("#step6_form .write").each(function() {
                attend_record.push($(this).val());
            });
            // var ret = toBase64($(".viewThumb img"), function(base64_data) {
            //     var img =$(this).attr('src');



            //  });
           
        // var img = $(".viewThumb img");
        // var ret = toBase64(this, function(data) {
        //     img.attr("src", data);
        //     console.log(img.attr("src", data));
        // });
        var attend_img= new Array();
        $("li img").each(function() {
            attend_img.push($(this).attr('src'));
        });
        
        $.ajax({
                url: $('input[name="url"]').val() + 'Index/saveAttend',
                type: 'POST',
                dataType: 'json',
                data: {
                    attend: attend,
                    teachingLevel: teachingLevel,
                    teachingEffect: teachingEffect,
                    teachingReadiness: teachingReadiness,
                    studentsNorm: studentsNorm,
                    classroom_facilities: classroom_facilities,
                    classroom_environmental: classroom_environmental,
                    attend_record: attend_record,
                    recordcount: recordcount,
                    attend_img:attend_img
                },
                success: function(data) {
                    if (data.status) {
                        var dialog1 = jqueryAlert({
                        'icon': $('input[name="url"]').val() + 'public/home/alert/img/right.png',
                        'content': '提交成功！',
                        'closeTime': 3000,
                    })
                        $("#submit").attr('disabled',true);
                        setTimeout("location.reload()",3000);
                    } else {

                    }
                }
            })
        })
    });